//
//  WWWeekWeatherCollectionCell.m
//  WhatWeather
//
//  Created by byn on 16/3/2.
//  Copyright © 2016年 byn. All rights reserved.
//

#import "WWWeekWeatherCollectionCell.h"
#import "WWWeatherInfo.h"
#import "WWCharmDate.h"
#import "WWCommonUtility.h"
#import "UIImage+Extend.h"

@implementation WWWeekWeatherCollectionCell

- (void)configureWeatherCollectionCell : (DailyForecast *)dailyForecast withIndex : (NSInteger)index {
    
    WWCharmDate *date = [WWCharmDate createDateWithDataStr:dailyForecast.date withDataFormatter:@"yyyy-MM-dd"];
        //[date addDays:index];
    _weekLabel.text = [WWCommonUtility getWeekDayOfToday:[date getWeekDay]];
    _dateLabel.text = [NSString stringWithFormat:@"%ld.%ld",[date getMonth],[date getDay]];
    UIImage *img = [UIImage imageNamed:dailyForecast.code_d];
    [_weatherIconImage setImage:[img imageWithTintColor : [UIColor whiteColor]]];
    
        //NSString *temToday = [NSString stringWithFormat:@"%@%@/%@%@",dailyForecast.temMin,@"°",dailyForecast.temMax,@"°"];
    _tempretureLabel.text = dailyForecast.txt_d;
}
@end






































